#include "student_lib.h"
#include "student.h"
#include <string>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main(){
    Student l[100], l2[100], l3[100];
    string keyword;
    int i,j,year;
    
    keyword = "NguyenV";
    i = 0;
    Search_by_name(keyword, "student.txt", l, i);
    cout << "Found "<<i<<" students\n";
    for (j = 0; j < i; j++){
        l[j].Show();
    }

    cout << "\n\n";

    keyword = "WEO";
    i = 0;
    Search_by_classname(keyword, "student.txt", l2, i);
    cout << "Found "<<i<<" students\n";
    for (j = 0; j < i; j++){
        l2[j].Show();
    }

    cout << "\n\n";

    year = 2;
    i = 0;
    Search_by_year(year, "student.txt", l3, i);
    cout << "Found "<<i<<" students\n";
    for (j = 0; j < i; j++){
        l3[j].Show();
    }

    system("pause");
    return 0;
}
